package org.hot100_1;

import org.algorithm.List.ListNode;

public class leetcode30 {
    public ListNode swapPairs(ListNode head) {
        if (head==null || head.next==null){
            return head;
        }

        ListNode one= head;
        ListNode two = head.next;

        ListNode three = swapPairs(two.next);

        two.next=one;
        one.next=three;

        return two;
    }
}
